<script lang="ts" setup>
import { service } from '@/utils/request'
import { ref } from 'vue'

const formData = ref({
  mobile: '13230000001',
  password: 'abc12345',
})
const getTestData = async () => {
  // service.get()
  // service.post()
  const res = await service.request({
    url: '/login/password',
    method: 'POST',
    data: formData.value,
  })
  console.log(res.data)
}
</script>

<template>
  <view class="test">
    <input type="text" v-model="formData.mobile" placeholder="手机号" />
    <input type="text" v-model="formData.password" placeholder="密码" />
    <button @tap="getTestData">测试请求-账号密码登录</button>
  </view>
</template>